﻿Public Class LeftMenuHeaderImageCommand
    Inherits NewImageCommand
    Private _color As Color
    Private _titlecolor As Color
    Private _gradientcolor As Color
    Private _bordercolor As Color
    Public Sub New(ByVal Color As Color, ByVal TitleColor As Color, ByVal GradientColor As Color, ByVal BorderColor As Color)
        MyBase.New("left_menu_header.gif", 200, 43)
        _color = Color
        _titlecolor = TitleColor
        _gradientcolor = GradientColor
        _bordercolor = BorderColor
    End Sub
    Public Overrides Sub ManipulateBitmap()
        Dim gradbrush As New LinearGradientBrush(New Rectangle(0, 0, 200, 43), _titlecolor, _color, LinearGradientMode.Vertical)
        g.FillRectangle(gradbrush, 0, 0, 200, 43) 'top gradient
        g.FillRectangle(New SolidBrush(_bordercolor), 0, 0, 1, 43) 'left border
        g.FillRectangle(New SolidBrush(_bordercolor), 0, 0, 200, 1) 'right border
        g.FillRectangle(New SolidBrush(_bordercolor), 199, 0, 1, 43) 'top border
        g.FillRectangle(New SolidBrush(_bordercolor), 4, 24, 192, 1) 'mid border
        gradbrush = New LinearGradientBrush(New Rectangle(4, 26, 192, 17), _gradientcolor, _color, LinearGradientMode.Vertical)
        g.FillRectangle(gradbrush, 4, 26, 192, 17) 'bottom gradient
    End Sub
End Class
